package com.guhappy.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class FormatterConverter {
	private static final Log log = LogFactory.getLog(FormatterConverter.class);

	public static Integer getInteger(String number)
    {
        try
        {
            return Integer.valueOf(number);
        }
        catch (Exception e)
        {
        	log.error("unable to parser Int for: " + number + e);
            return null;
        }
    }
	
	public static Long getLong(String number)
    {
        try
        {
            return Long.valueOf(number);
        }
        catch (Exception e)
        {
        	log.error("unable to parser Int for: " + number + e);
            return null;
        }
    }
	public static Float getFloat(String number)
    {
        try
        {
            return Float.valueOf(number);
        }
        catch (Exception e)
        {
        	log.error("unable to parser Float for: " + number + e);
            return null;
        }
    }
}
